FROM registry.cn-hangzhou.aliyuncs.com/tpshion/tpshion-devops:1.7.0

ENV LANG C.UTF-8
ENV TZ Asia/Shanghai
ENV workspace /home/tpshion-devops/workspace
ENV mavenHome /home/apache-maven-3.9.5
ENV javaHome /usr/lib/jvm/java-11-openjdk-amd64
ENV env prod

ADD target/tpshion-devops-1.0.0.jar tpshion-devops.jar

EXPOSE 8080

ENTRYPOINT ["sh", "-c", "systemctl start redis-server && java -server -Xms512m -Xmx1024m -Dspring.profiles.active=$env -Dnode.workspace=$workspace -Dnode.mavenHome=$mavenHome -Dnode.javaHome=$javaHome -jar /tpshion-devops.jar"]
